﻿<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
<%@ include file="../commons/tag.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head></head>
<body>
<script type="text/javascript">
		$(document).ready(function(){
			//聚焦第一个输入框
			$("#enterCount").focus();
		});	
	//表单验证
	function volidate(){
		var enterCount=$("#enterCount").val();
  		var tryonCount=$("#tryonCount").val();
  		var tradeCount=$("#tradeCount").val();
  		var tradeAmount=$("#tradeAmount").val();
  		var result1 = $("#result1").attr("checked");
  		var result2 = $("#result2").attr("checked");
  		var result3 = $("#result3").attr("checked");
  		var reason = $("#reason").val();
		var name= $("#name").val();
		var phone= $("#phone").val();
		if($.trim(enterCount).length<1){
			alert("请输入进店人数!");	
			return false;
		}
		if(result1 && $.trim(tradeCount).length<1){
			alert("请输入成交人数!");	
			return false;
		}
		if(result1 && $.trim(tradeAmount).length<1){
			alert("请输入成交金额!");	
			return false;
		}

		if(result2 && $.trim(tryonCount).length<1){
			alert("请输入试穿人数!");	
			return false;
		}
		if($.trim(reason).length<1){
			alert("请输入导致结果原因!");	
			return false;
		}
		if(result3 && $.trim(name).length<1 ){
			alert("请输入顾客姓名!");	
			return false;
		}
		if(result3 && $.trim(phone).length<1 ){
			alert("请输入顾客电话!");	
			return false;
		}
		
    	return true;
	}
   
 </script>
 
  <!--     主体从这开始    -->
  <div class="container">
  	<h2><span>添加员工</span></h2>
     <form action="${ctx}/personnel/add" method="post" id="form1">
     <table class="global_table" cellpadding="0" cellspacing="0"> 
      <tr> 
        <th style="width:110px;">用户名：</th> 
        <td>
        	<input type="text" id="username" name="username" 
        		class="g_inp width100" onfocus="this.className='g_inp inn width100'" onblur="this.className='g_inp width100'" />
        </td>
         <th style="width:110px;">密码：</th>
        <td>
        	<input type="text" id="password" name="password" value=""
        		class="g_inp width100" onfocus="this.className='g_inp inn width100'" onblur="this.className='g_inp width100'" />
         </td>
      </tr>
     
    </table> 
   <br />
    <center>
    	<input type="reset" class="g_btn_blue2" value="清  空" />
      	&nbsp; &nbsp; &nbsp;
     	<input type="submit" class="g_btn_blue" value="保  存" id="searchBtn"/>
    </center>
    </form>
  </div>
  <!--     主体 end    -->
  <!-- 统计代码 begin-->
  <!--统计代码 end-->
</body>
</html>
